from django.db import models
from db_cc.base_model import BaseModel
from django.contrib.auth.models import AbstractUser
from tinymce.models import HTMLField
from datetime import datetime
from apps.goods.models import *


class User(AbstractUser,BaseModel):

    user_phone = models.CharField(max_length=255)

    class Meta:
        db_table = 'df_user'
        verbose_name='用户'
        verbose_name_plural=verbose_name

class Address(BaseModel):

    user = models.ForeignKey('User',verbose_name='所属账号',on_delete=models.CASCADE)
    receiver = models.CharField(max_length=20,verbose_name='收件人')
    addr = models.CharField(max_length=256,verbose_name='收件地址')
    zip_code = models.CharField(max_length=6,null=True,verbose_name='邮政编码')
    phone=models.CharField(max_length=11,verbose_name='联系电话')
    is_defaut=models.BooleanField(default=False,verbose_name='是否默认')
    symbol = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        db_table='df_address'
        verbose_name='地址'
        verbose_name_plural=verbose_name




